<template>
  <div class="Movie">
    <h2>Movie</h2>
    <h3>Count组件中的num值是{{ num }}</h3>
    <h3>Count组件中的addNum值是{{ addNum }}</h3>
    <button @click="getMovieList">获取最新的电影列表</button>

    <!-- Movie 模块传值 -->
    <ul>
        <li v-for="item in movieList" :key="item.tvId">
            <span style="font-size: 20px">{{item.name}}</span>
        </li>
    </ul>
  </div>
</template>

<script>
import { mapState, mapGetters, mapActions } from "vuex";
export default {
    name:"Movie",
    methods: {
        ...mapActions("Movie",['getMovieList'])
    },
    computed: {
    ...mapState("Count",["num"]),
    ...mapGetters("Count",["addNum"]),
    ...mapState("Movie",["movieList"])
  },
}
</script>

<style>
.Movie{
    background-color: Violet;
}
</style>